package cn.itcast.oss.autoconfigure;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration
@Import(OssProperties.class)
public class OssAutoConfiguration {
    //存在问题
    @Autowired
    private OssProperties properties;

    //创建OssTemplate对象，存入容器
    @Bean
    public OssTemplate ossTemplate(){
        return new OssTemplate(properties);
    }

}
